package com.itany.book.order.dao;

import com.itany.book.pojo.BookSupplier;
import com.itany.book.pojo.Order;
import com.itany.book.pojo.OrderBook;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Author:yaozhiyuan0117@163.com
 * Time:2019/12/31 15:54
 * Describe:
 * version:1.0
 */

@Repository
public interface OrderMapper {

    public Order selectOrderDetailsById(Integer id);

    void insertOrder(Order order);

    void insertOrderBook(OrderBook ob);

    void updateOrderFlagTo1(@Param("no") String no);

    Integer selectByno(@Param("no") String no);

    List selectOrderBookByOrderId(@Param("orderId") Integer orderId);

    void updateBookNumber( OrderBook orderBook);

    BookSupplier selectBookSupplierByBookIdLimit1EnoughNumber(@Param("bookid") Integer bookid);

    void updateBookSupplier(BookSupplier bs);
}
